/**
 * Description:
 * 全局常量
 * Created by longyihuang on 2019/4/26
 * E-Mail: 475865662@qq.com
 */
export const APPID = '70ba55d12d8349e8975d6858e15315ca';
export const DATE_TIME_FORMAT = 'YYYY-MM-DD HH:mm:ss';
export const ALIYUN_CALL_CENTER_INSTANCE_ID = '5de5e024-bfa4-4e3f-b25f-ce6adcccb09e';
export const CODE_INTERVAL_SECONDS = 60;
export const VERSION = 'V1.0.1'
export const PAGE_SIZE = 10;
export const PAGE_SIZE_RANGE = [10, 20, 50, 100];

export const CallWorkStatus = {
  WORK_STATUS_SIGN_OUT: 1, // 签出
  WORK_STATUS_SIGN_IN: 2, // 签入
  WORK_STATUS_READY: 3, // 空闲
  WORK_STATUS_BREAK: 4, // 小休
  WORK_STATUS_AFTER_CALL: 5, // 话后处理
  WORK_STATUS_CALL_COMING: 6, // 来电振铃
  WORK_STATUS_DIALING_CALL: 8, // 拨号
  WORK_STATUS_IN_CALL_COMING: 9, // 来电接通
  WORK_STATUS_IN_DIALING_CALL: 10 // 拨号接通
}

export const CheckOutStatus = {
  CANCEL_CHECK_OUT: 1,
  FINISH_CHECK_OUT: 2,
  RECEIVE_CHECK_OUT: 3,
  CONFIRM_FEE: 4
}

export const CheckOutFormStatus = {
  APPLIED: 1,
  RECEIVED: 2,
  CANCEL: 3,
  USER_CONFIRMING: 4,
  FINISHED: 5,
  EMPLOYEE_CONFIRMING: 6
}

export const CheckoutTypes = {
  CANCEL_LEASE_TYPE_NORMAL: 1, // 正常退租
  CANCEL_LEASE_TYPE_ADVANCE: 2, // 提前退租
  CANCEL_LEASE_TYPE_ELIMINATE: 3, // 清退
  CANCEL_LEASE_TYPE_CHANGE_RENT: 4, // 换租退租
  CANCEL_LEASE_TYPE_TOVOID: 5, // 作废
  CANCEL_LEASE_TYPE_NOTBACK: 6 // 非退
}

export const CallType = {
  CALL_IN: 1,
  CALL_OUT: 2
}

export const OrderHandleRecordType = {
  RECORD_TYPE_CREATE_ORDER: 1,
  RECORD_TYPE_AUTO_DISPATCH: 2,
  RECORE_TYPE_DISPATCH: 3
}


export const OrderType = {
  ORDER_TYPE_CLEAN_INDOOR: 1, // 户内保洁工单
  ORDER_TYPE_CLEAN_PUBLIC_AREA: 2, // 公区保洁工单
  ORDER_TYPE_MAINTAIN_INDOOR: 3, // 户内维修工单
  ORDER_TYPE_MAINTAIN_PUBLIC_AREA: 4, // 公区维修工单
  ORDER_TYPE_COMPLAINT_CLEAN: 5, // 保洁投诉工单
  ORDER_TYPE_COMPLAINT_MAINTAIN: 6, // 维修投诉工单
  ORDER_TYPE_COMPLAINT_SALE: 7, // 销售投诉工单
  ORDER_TYPE_COMPLAINT_VTOWN: 8, // 微棠投诉工单
  ORDER_TYPE_COMPLAINT_ORDER: 9, // 其他投诉工单
  ORDER_TYPE_VTOWN: 10, // 微棠工单
  ORDER_TYPE_OTHER: -1 // 其他类型的工单
}


export const BzFormItemType = {
  None: -1,
  Input: 0,
  Checkbox: 1,
  Radio: 2,
  TimePicker: 3,
  DatePicker: 4,
  DateTimePicker: 5,
  InputArea: 6,
  UploadImage: 7,
  UploadFile: 8,
  UploadAvatar: 9,
  Select: 10,
  RentCheckOut: 11,
  InputNumber: 12
}
export const ProductStatus = {
  PUTAWAY: 1, // 上架
  SOLD_OUT: 2 // 下架
}


export const HouseLockStatus = {
  LOCK: {
    name: '下架',
    value: 1
  },
  UNLOCK: {
    name: '上架',
    value: 0
  }
}

export const ProductCoverCategory = {
  BIG_COVER: 1, // 大封面
  SMALL_COVER: 2 // 小封面
}

export const EnclosureType = {
  CHECK_IN_CONVENTION: 1, // 入住公约
  SAFETY_INSTRUCTION: 2, // 安全须知
  CONTRACT: 3 // 合同正文
}


export const NotificationStatus = {
  PUBLISH: 1, // 已发布
  REPEAL: 0 // 已撤销
}

export const NotifyFeatureTypes = {
  ZONE: 1, // 区域,
  TENANTS: 2, // 住户,
  ACCOUNT: 3 // 账号,
}

export const NotifyTypes = {
  APP_DIALOG: 1, // APP弹窗
  TASK_MES_QUEUE: 2 // 任务栏消
}


export const NotifyJumpTypes = {
  HOUSE_DETAIL: 0, // 房源商品详情
  WEB_LINK: 1, // 网页链接
  ARTICLE: 3 // 文章
}

export const StatementType = {
  OCCUPANCY_RATE: 1, // 入住率
  LETTING_RATE: 2, // 出租率
  CHECKOUT_RATE: 3, // 退租率
  RELET_RATE: 4 // 续租率
}

export const HouseStatusTypes = {
  LOCK_STATUS: 1, // 房源上下架（锁房）状态
  DELIVER_TIME: 2, // 签约日
  ENGINEERING_STATUS: 3, // 工程状态
  USAGE_TYPE: 4, // 房源用途
  MARKETING_STATE: 5 // 营销状态
}

export const NewHouseStatusTypes = {
  UNDONE: {
    name: '未开业',
    value: 1
  },
  EMPTY: {
    name: '空置房',
    value: 2
  },
  RESERVE: {
    name: '已预订',
    value: 3
  },
  SIGN: {
    name: '已签约',
    value: 4
  },
  CHECK_IN: {
    name: '已入住',
    value: 5
  },
  HOLD: {
    name: '已挂起',
    value: 6
  }
}

export const HouseUsageTypes = {
  PERSONAGE: {
    name: '个人入住',
    value: 1,
    icon: 'iconfont icon-house-usage-personage'
  },
  ENTERPRISE: {
    name: '企业入住',
    value: 2,
    icon: 'iconfont icon-house-usage-enterprise'
  },
  TEMPORARY: {
    name: '临时房',
    value: 3,
    icon: 'iconfont icon-house-usage-temporary'
  },
  MODEL: {
    name: '样板房',
    value: 4,
    icon: 'iconfont icon-house-usage-model'
  },
  REPAIR: {
    name: '维修房',
    value: 14,
    icon: 'iconfont icon-house-usage-repair'
  },
  CHECK: {
    name: '检测房',
    value: 15,
    icon: 'iconfont icon-house-usage-check'
  },
  OFFICE: {
    name: '办公室',
    value: 10
  },
  WARE_HOUSE: {
    name: '仓库',
    value: 11
  },
  SHOWROOM: {
    name: '展厅',
    value: 12
  },
  FIRE_CONTROL_ROOM: {
    name: '消控室',
    value: 13
  },
}

export const UpdateHouseStatusTypes = {
  TEMPORARY: {
    name: '临时房',
    value: 1
  },
  MODEL: {
    name: '样板房',
    value: 2
  },
  REPAIR: {
    name: '维修房',
    value: 3
  },
  CHECK: {
    name: '检测房',
    value: 4
  },
  SALES_PROHIBITION: {
    name: '禁售',
    value: 5
  },
  RESTORE: {
    name: '还原',
    value: 6
  }
}


export const HouseEngineeringStatusTypes = {
  DELIVERY: {
    name: '已交付',
    value: 1,
    icon: 'iconfont icon-engineering-status-delivery'
  },
  CHECK_OUT_CONFIG: {
    name: '退租配置中',
    value: 2,
    icon: 'iconfont icon-engineering-status-check-out-config'
  },
  REPAIR: {
    name: '维修中',
    value: 3,
    icon: 'iconfont icon-engineering-status-repair'
  },
  CONFIG: {
    name: '配置中',
    value: 4,
    icon: 'iconfont icon-engineering-status-config'
  },
  ACCEPTANCE: {
    name: '验收中',
    value: 5,
    icon: 'iconfont icon-a-engineering-status-checkandaccept'
  },
  OPENCHIP: {
    name: '开筹中',
    value: 6,
    icon: 'iconfont icon-a-engineering-status-openchip'
  }
}

export const HouseOtherConditionTypes = {
  CHECK_IN_PEOPLE: {
    name: '入住人数',
    value: -1,
    icon: 'iconfont icon-icon-other-condition-check-in-peoplebeifen'
  },
  REMAIN_CHECK_OUT_DAY: {
    name: '退房剩余天数',
    value: -2,
    icon: 'iconfont icon-icon-other-condition-remain-daybeifen'
  },
  REMAIN_REPAIR_DAY: {
    name: '维修剩余天数',
    value: -2,
    icon: 'iconfont icon-a-time1'
  },
  WAIT_FOR_CHECK_OUT: {
    name: '待退',
    value: 1,
    icon: 'iconfont icon-other-condition-wait-for-check-out'
  },
  ARREARAGE: {
    name: '欠费',
    value: 2,
    icon: 'iconfont icon-other-condition-arrearage'
  },
  OVERDUE: {
    name: '逾期未退',
    value: 3,
    icon: 'iconfont icon-other-condition-overdue'
  },
  SALES_PROHIBITION: {
    name: '禁售',
    value: 5,
    icon: 'iconfont icon-other-condition-sales-prohibition'
  }
}

export const CommentTypes = {
  SIGN: {
    name: '签约评价',
    value: 1
  },
  LIVE: {
    name: '居住评价',
    value: 2
  }
}

export const AdvertisingStatus = {
  PUBLISH: {
    name: '已发布',
    value: 1
  },
  REVOCATION: {
    name: '已撤销',
    value: 2
  }
}

export const AdvertisingTypes = {
  POWER_ON: {
    name: '开机广告',
    value: 1
  },
  UNLOCKING: {
    name: '开锁广告',
    value: 2
  },
  DEFAULT_POWER_ON: {
    name: '开机广告',
    value: 3
  },
  DEFAULT_UNLOCKING: {
    name: '开锁广告',
    value: 4
  }
}

export const NavigationMenuAuth = {
  DOOR_AUTH: {
    name: '租务-导航菜单-门禁权限',
    value: '7ACAAE3620F774C8552A657AF964490D'
  },
  RESIDENT_MANAGEMENT: {
    name: '租务-导航菜单-住户管理',
    value: 'AEB3D92419D7E6DEE1F9FA40C5056A04'
  },
  BUSINESS_MANAGEMENT: {
    name: '租务-导航菜单-业务管理',
    value: '85B28E5B3AC3476A9FBA3BFCA1CB9378'
  },
  REPORT: {
    name: '租务-导航菜单-报表统计',
    value: 'E41CA3765537E21D3B5CCC4A96D2A36A'
  },
  VALUE: {
    name: '租务-导航菜单-增值服务',
    value: '8CE4F24B23908AAFEE5F5289CA807F31'
  },
  DEVICE: {
    name: '租务-导航菜单-智能设备',
    value: 'E9D1342BACAA52BA8765E5C42235267E'
  },
  APP: {
    name: '租务-导航菜单-APP展示',
    value: '266549624CEE655E420A2C747B264D3F'
  },
  NOTIFY: {
    name: '租务-导航菜单-通知内容',
    value: '072D74A6EA35D3F11E9264134DF78076'
  },
  CONTRACT_MANAGEMENT: {
    name: '租务-导航菜单-合同管理',
    value: 'A962A26967B0AD6A54002A3DD4C977F0'
  },
  SYSTEM_CONFIG: {
    name: '租务-导航菜单-系统配置',
    value: '340BE35AC62EE1EA0433480C1C30B824'
  },
  CLUB: {
    name: '租务-导航菜单-社团活动',
    value: '201D0E24F76569F2EB36DBD8A05BBB6F'
  },
  PROJECT_CONFIG: {
    name: '租务-导航菜单-项目配置',
    value: '201D0E24F76569F2EB36DBD8A05BBB6F'
  } // FIXME:value 值暂无
}

export const ClubMemberCheckResult = {
  PASS: {
    name: '通过',
    value: 1
  },
  REJECT: {
    name: '拒绝',
    value: 0
  },
  WAIT_FOR_CHECK: {
    name: '待审核',
    value: 2
  }
}


export const SPACE_ASSET_TYPE = {
  FLOOR: {
    name: '楼层',
    value: 28
  },
  UNIT: {
    name: '单元',
    value: 26
  },
  BUILDING: {
    name: '楼栋',
    value: 25
  },
  GROUP: {
    name: '团组',
    value: 63
  },
  COMMUNITY: {
    name: '小区',
    value: 24
  },
  HOUSE: {
    name: '房屋',
    value: 30
  }
}

export const DEVICE_SMART_TYPE = {
  DOOR: {
    name: '门锁',
    value: 1302,
    unit: '%(剩余电量)'
  },
  WATER: {
    name: '水表',
    value: 1402,
    unit: 'm³'
  },
  ELECTRIC: {
    name: '电表',
    value: 1502,
    unit: 'KW.h'
  },
  GAS: {
    name: '燃气表',
    value: 1702,
    unit: 'm³'
  },
  HOTWATER: {
    name: '热水表',
    value: 1602,
    unit: 'm³'
  }
}

export const SaleStatus = {
  SALES_PROHIBITION: {
    name: '禁售',
    value: 0
  },
  SALE: {
    name: '可售',
    value: 1
  }
}


export const BillType = {
	BILL_TYPE_MAINTAIN_INDOOR: {name: '住房维修', value: 1},
	BILL_TYPE_CLEAN_CHECK_IN: {name: '入住保洁', value: 2},
	BILL_TYPE_RESIDENT_COMPLAINT: {name: '住户投诉', value: 3},
	BILL_TYPE_NOT_RESIDENT_COMPLAINT: {name: '非住户投诉', value: 4},
	BILL_TYPE_MAINTAIN_INDOOR_EMPTY: {name: '空房维修', value: 5},
	BILL_TYPE_MAINTAIN_OUTDOOR: {name: '公区维修', value: 6},
	BILL_TYPE_CLEAN_INDOOR_EMPTY: {name: '空房保洁', value: 7},
	BILL_TYPE_CLEAN_OUTDOOR: {name: '公区保洁', value: 8},
	BILL_TYPE_CLEAN_INDOOR: {name: '增值保洁', value: 9},
	BILL_TYPE_INSPECTION_INDOOR_EMPTY: {name: '空房检修', value: 10},
	BILL_TYPE_OPEN_DOOR_HOUSE: {name: '开门订单', value: 11},
	BILL_TYPE_HOUSE_MOVING: {name: '搬运订单', value: 12}
}

export const ApplicationTypes = {
  OWNER_SERVICE_MANAGEMENT: {
    name: '业主服务管理',
    value: 'b0fa6f1ddd7644c1a7214d3c183ab4eb',
    url: process.env.VUE_APP_RENT_OWNER_BASE_URL,
    code: "owner_service_management"
  },
  COMMUNITY_SHOP_MANAGE: {
    name: '社区商铺管理',
    value: '072ecf548dea48d6a9e83b17ed35562a',
    url: process.env.VUE_APP_RENT_SHOP_BASE_URL,
    code: "community_shop_manage"
  },
  RENT_CENTER: {
    name: '租务中心',
    url: process.env.VUE_APP_BASE_URL
  }
}

export const BuildingStatusTypes = {
  UNCHECK: {
    name: '待验收',
    value: 0,
    color: '#F29727',
    style: {
      color: "#FFFFFF",
      border: "1px solid #FFFFFF",
      background: "#F29727"
    }
  },
  CHECKING: {
    name: '验收中',
    value: 2,
    color: '#5BB1F8',
    style: {
      color: "#FFFFFF",
      border: "1px solid #FFFFFF",
      background: "#5BB1F8"
    }
  },
  CHECK: {
    name: '已验收',
    value: 1,
    color: '#50BF78',
    style: {
      color: "#FFFFFF",
      border: "1px solid #FFFFFF",
      background: "#50BF78"
    }
  }
}

export const ImportContentType = {
  UNIT_ASSETS: {
    name: '户型资产',
    value: 2
  },
  BUILDING: {
    name: '楼栋房间',
    value: 3
  }
}

export const AssetImportStatus = {
  SUCCESS: 1,
  FAIL: 2,
  IMPORTING: 3
}

export const TodoType = {
  CHECKBUILDINGAPPLICATION: { name: '验楼申请', value: 'acceptanceApply' },
  CHECKBUILDINGRESULT: { name: '验楼结果', value: 'acceptanceResult' }
}

// 景域
export const JviewHouseStatusTypes = [{
    key: 1,
    name: "待出租",
    background: '#ACDECA',
    color: '#FFFFFF'
  },
  {
    key: 2,
    name: "已预定",
    background: '#A08866',
    color: '#FFFFFF'
  },
  {
    key: 3,
    name: "已出租",
    background: '#FFFFFF',
    color: '#555555',
    border: '1px solid #979797'
  },
  {
    key: 8,
    name: "不可出租",
    background: '#999999',
    color: '#FFFFFF'
  },
  {
    key: 4,
    name: "已欠费",
    background: '#FF0D01',
    color: '#FFFFFF'
  },
  {
    key: 5,
    name: "即将到期",
    background: '#FFFF00',
    color: '#000000'
  },
  {
    key: 6,
    name: "待退租",
    background: '#FFA4A4',
    color: '#FFFFFF'
  },
  {
    key: 7,
    name: "已到期",
    background: '#1890FF',
    color: '#FFFFFF'
  },
  {
    key: 11,
    name: "逾期未退",
    background: '#FF9500',
    color: '#FFFFFF'
  },
  {
    key: 9,
    name: "销控",
    background: '#5E5CE6',
    color: '#FFFFFF'
  },
  {
    key: 10,
    name: "已入住",
    background: '#028080',
    color: '#FFFFFF'
  }
]

export const JviewHouseStatusTypesObj = {
  EMPTY: {
    value: 1,
    name: "待出租"
  },
  RESERVE: {
    value: 2,
    name: "已预定"
  },
  RENTED: {
    value: 3,
    name: "已出租"
  },
  HOLD: {
    value: 8,
    name: "不可出租"
  },
  ARREARS: {
    value: 4,
    name: "已欠费"
  },
  EUE_SOON: {
    value: 5,
    name: "即将到期"
  },
  LEASES: {
    value: 6,
    name: "待退租"
  },
  EXPIRED: {
    value: 7,
    name: "已到期"
  },
  LATE: {
    value: 11,
    name: "逾期未退"
  },
  SALES_CONTROL: {
    value: 9,
    name: "销控"
  },
  CHECK_IN: {
    value: 10,
    name: "已入住"
  },
}

export const JviewUpdateHouseStatusTypes = {
  TEMPORARY: {
    name: '临时房',
    value: 1
  },
  MODEL: {
    name: '样板房',
    value: 2
  },
  REPAIR: {
    name: '维修房',
    value: 3
  },
  CHECK: {
    name: '检测房',
    value: 4
  },
  CLEANING: {
    name: '保洁房',
    value: 5
  },
  ACCIDENT: {
    name: '事故房',
    value: 6
  },
  OFF: {
    name: '下架',
    value: 7
  },
  UP: {
    name: '上架',
    value: 8
  },
  RETURN: {
    name: '还原',
    value: 20
  },
}

export const JviewHouseUsageTypes = {
  PERSONAGE: {
    name: '个人入住',
    value: 1,
    icon: 'jvIconfont icon-icon_house_personage'
  },
  TEMPORARY: {
    name: '临时房',
    value: 3,
    icon: 'jvIconfont icon-icon_house_temporary'
  },
  MODEL: {
    name: '样板房',
    value: 4,
    icon: 'jvIconfont icon-icon_house_model'
  },
  REPAIR: {
    name: '维修房',
    value: 14,
    icon: 'jvIconfont icon-icon_house_repair2'
  },
  CHECK: {
    name: '检测房',
    value: 15,
    icon: 'jvIconfont icon-icon_house_jian'
  },
  CLEANING: {
    name: '保洁房',
    value: 16,
    icon: 'jvIconfont icon-bianzu'
  },
  ACCIDENT: {
    name: '事故房',
    value: 17,
    icon: 'jvIconfont icon-icon-house-shigu'
  },
}

export const JviewHouseEngineeringStatusTypes = {
  DELIVERY: {
    name: '已交付',
    value: 1,
    icon: 'iconfont icon-icon_house_finsh'
  },
  CHECK_OUT_CONFIG: {
    name: '退租配置中',
    value: 2,
    icon: 'iconfont icon-icon_house_config'
  },
  REPAIR: {
    name: '维修中',
    value: 3,
    icon: 'iconfont icon-icon_house_repair'
  },
  CONFIG: {
    name: '配置中',
    value: 4,
    icon: 'iconfont icon-icon_house_new'
  },
  ACCEPTANCE: {
    name: '验收中',
    value: 5,
    icon: 'iconfont icon-a-engineering-status-checkandaccept'
  },
  OPENCHIP: {
    name: '开筹中',
    value: 6,
    icon: 'iconfont icon-a-engineering-status-openchip'
  }
}

export const JviewHouseOtherConditionTypes = {
  MAN: {
    name: '男士',
    value: 1,
    icon: 'jvIconfont icon-icon_house_man'
  },
  WOMAN: {
    name: '女士',
    value: 2,
    icon: 'jvIconfont icon-icon_house_women'
  },
  CHILDREN: {
    name: '儿童',
    value: 3,
    icon: 'jvIconfont icon-icon_house_baby1'
  },
  PETS: {
    name: '宠物',
    value: 5,
    icon: 'jvIconfont icon-icon_house_cat1'
  }
}

export const ReportLayoutType = {
  TAB: 'tab',
  SINGLE: 'single',
  DOUBLE: 'double',
  COMBINATION: 'combination'
}

export const ReportContentType = {
  TABLE: 1,
  CHART: 2
}

export const ChartType = {
  LINE: {
    name: '曲线图',
    value: 'line'
  },
  BAR: {
    name: '柱状图',
    value: 'bar'
  },
  PIE: {
    name: '饼图',
    value: 'pie'
  },
}

export const ReportFilterType = {
  CASCADER: 'cascader',
  SELECT: 'select',
  INPUT: 'input',
  NUMBER_RANGE: 'numberRange',
  INPUT_NUMBER: 'inputNumber',
  TIME_PICKER_RANGE: 'timePickerRange',
}

export const SignStateType = {
  SIGN: {
    name: '已签约',
    value: 0,
    background: '#29C37F',
    color: '#FFFFFF'
  },
  NOT_SIGN: {
    name: '未签约',
    value: 1,
    background: '#FF6159',
    color: '#FFFFFF'
  }
}

export const OwnerOtherConditionTypes = {
  CHECK_IN_PEOPLE: {
    name: '入住人数',
    value: -1,
    icon: 'iconfont icon-icon-other-condition-check-in-peoplebeifen'
  }
}

/**
 * 资产导入类型
 */
export const AssetImportTypes = {
  HOUSES: 1,
  HOUSE_ASSETS: 2,
  INTELLIGENT_DEVICES: 3,
  LOCK: 4
}

/**
 * 资产目录导入类型
 */
export const AssetLevelImportTypes = {
	FIRST_LEVEL: 4,
	SECOND_LEVEL: 5,
	THIRD_LEVEL: 6,
  REPAIR_LEVEL:7
}


